#include <RandomGenerator.hpp>
#include <cstdlib>
#include <Trie.hpp>

std::string RandomGenerator::generate(bool insensitive) {
	char buffer[6];
	// int qtyLetters = (rand() % 5) + 1;
	int qtyLetters = 5;
	for (int i = 0; i < qtyLetters; i++)
		buffer[i] = Trie::convertToChar(rand() % (insensitive ? 26 : 52));
	buffer[qtyLetters] = 0;
	return std::string(buffer);
}
